home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-07-17 | 3.5 KB | 94 lines | [ttro/ttxt] |
-
- DialogDisplay XFCN for HyperCard
- ------------------------------
- VERSION 1.5 - July 1993
- ------------------------------
- Version 1.5 of DialogDisplay adds several new features which were needed to
- evolve this XFCN into a more useful tool. I also crushed a couple of bugs
- which existed in 1.0 (see bugs below).
-
- DialogDisplay can now receive feedback from 1 to 3 buttons, and can display
- up to 4 strings of text. You first must set up your dialog (DLOG) resource in
- ResEdit. Each item in a dialog has an item number. Item numbers 1-3 are
- reserved in DialogDisplay for buttons only.
-
- ------------------------------------------------------------------------
- SYNTAX BREAKDOWN:
-
- DialogDisplay (rsrcId, button1, button2, button3, text1, text2,
- text3, text4, outline)
-
- rsrcId = The resource ID of the dialog window to be displayed.
- button1 = The name for button 1 (Dialog Item 1)
- button2 = The name for button 2 (Dialog Item 2)
- button3 = The name for button 3 (Dialog Item 3)
- text1 - text4 = The text to be displayed in a static text item using
- ^# for each item in the DLOG resource, where # is a
- number starting at 0 up to 3.
- outline - Pass a 1 or 0 depending on whether or not you want to
- outline the first button (Dialog Item 1).
- -------------------------------------------------------------------------
-
- You can leave parameters blank if you like. For example, you may only have one
- button and one text string. In this case, your script would look like the following:
-
- on mouseUp
- put DialogDisplay(1000,"OK",,,"Welcome!",,,,1) into buttonResult
- end mouseUp
-
- The XFCN will return the number of the button pressed.
- So, if you have a dialog with three buttons, and one string
- of text, here is what you might do to handle the returning information:
-
- on mouseUp
- put DialogDisplay(1000,"Yes","No","Cancel","Want to quit?",,,,1) into buttonResult
- if buttonResult = "1" then
- ... handle button one stuff
- else if buttonResult = "2" then
- ... handle button two stuff
- else if buttonResult = "3" then
- ... handle button three stuff
- end if
- end mouseUp
-
- See the scripts for each of the Example buttons in the stack for more
- complete information on how to use DialogDisplay in your own stacks.
-
- -------------------------------------------------------------------------
- BUG FIXES - 1.0->1.5
-
- 1. Fixed a bug which would cause a major crash if the user specified a 1 for
- the outline parameter and dialog item 1 was not a button. The software now
- checks to see what the item is before modifying or outlining it.
-
- 2. Added a clean up routine to remove handles and resources when done. This was
- causing some memory problems in 1.0.
-
- 3. Fixed a problem which would cause the program to crash HyperCard if the
- dialog was not set to be initially visible (via ResEdit). Dialogs which are not
- visible will be made visible by the software.
-
- 4. Added code to allow the user to outline ICON/cicn dialog items.
-
- -------------------------------------------------------------------------
-
- DialogDisplay is SHAREWARE. If you intend to use this XFCN in any of your own
- shareware, public domain, or commercial stacks please send $15 to the address
- below. You will receive a license for UNLIMITED use in any number of stacks you
- create.
-
- Send your check or money order to:
-
- Software Perspectives
- 3084 Peachtree Court
- Lake Ridge, Virginia 22192-1518
-
- Registered users get FREE updates for as long as you own the software. Free
- techical support is also available on America Online or AppleLink.
-
- America Online E-Mail: SPerspect
- AppleLink: KHarris
-
-
-
-